; Music of Masters of the Universe (1987) (Gremlin Graphics) (Ben Daglish)
; Ripped by Megachur the 16/12/2006

	write "MASTEOTU.BIN"

music_date_rip	equ &10c6
music_adr	equ &93ce
first_theme	equ 0
last_theme	equ 0

	read "music_header_v1_0.asm"

;93ce
.l93ce
	db &bf
.l93d4 equ $ + 5
.l93d3 equ $ + 4
.l93d2 equ $ + 3
.l93cf
	db #fe,#f7,#09,#00,#00,#00,#00,#00
	db #00,#00,#00,#00,#00,#00,#00,#00
	db #00,#00
.l93e6 equ $ + 5
.l93e5 equ $ + 4
.l93e4 equ $ + 3
.l93e1
	db #fd,#ef,#12,#00,#00,#00,#00,#00
	db #00,#00,#00,#00,#00,#00,#00,#00
	db #00,#00
.l93f8 equ $ + 5
.l93f7 equ $ + 4
.l93f6 equ $ + 3
.l93f3
	db #fb,#df,#24,#00,#00,#00,#00,#00
	db #00,#00,#00,#00,#00,#00,#00,#00
.l9405 equ $ + 2
	db #00,#00,#00
.l9406
	ld a,ly
	ld (ix+#0f),a
	ld a,hy
	ld (ix+#10),a
	ld (ix+#03),l
	ld (ix+#04),h
	ld (ix+#06),c
	ld a,(iy+#05)
	ld (ix+#07),a
	ld a,(iy+#06)
	and #7f
	srl a
	jr nz,l942a
	ld a,#01
.l942a
	ld (ix+#08),a
	ld a,(iy+#07)
	ld (ix+#0b),a
	ld a,(iy+#08)
	ld (ix+#0c),a
	xor a
	ld (ix+#09),a
	ld (ix+#0a),a
	ld a,(l93ce)
	or (ix+#02)
	ld c,(iy+#09)
	ld (ix+#11),c
	bit 0,c
	jr z,l9453
	and (ix+#00)
.l9453
	bit 1,c
	jr z,l945a
	and (ix+#01)
.l945a
	ld (l93ce),a
	bit 2,c
	jr nz,l946b
	ld hl,l9598
	ld (ix+#0d),l
	ld (ix+#0e),h
	ret
.l946b
	call l9678
	ld a,(iy+#00)
	ld c,#0d
	call l9650
	ld a,(iy+#04)
	ld c,#0b
	call l9650
	inc c
	xor a
	call l9650
	ld (ix+#05),#ff
	jp l9684
.l948a
	call l9678
	ld c,#07
	ld a,(l93ce)
	or #3f
	ld (l93ce),a
	call l9650
	xor a
	inc c
	call l9650
	inc c
	call l9650
	inc c
	call l9650
	jp l9684
.l94aa
	ld a,(l93ce)
	and #3f
	cp #3f
	ret z
	ld ix,l93cf
	call l9566
	ld ix,l93e1
	call l9566
	ld ix,l93f3
	call l9566
	call l9678
	ld ix,l93cf
	ld c,#07
	ld a,(l93ce)
	call l9650
	ld c,#00
	ld a,(l93d2)
	add (ix+#09)
	bit 1,(ix+#11)
	jp z,l94e8
	ld (l9405),a
.l94e8
	call l9650
	inc c
	ld a,(l93d3)
	adc (ix+#0a)
	call l9650
	inc c
	ld a,(l93e4)
	add (ix+#1b)
	bit 1,(ix+#23)
	jp z,l9506
	ld (l9405),a
.l9506
	call l9650
	inc c
	ld a,(l93e5)
	adc (ix+#1c)
	call l9650
	inc c
	ld a,(l93f6)
	add (ix+#2d)
	bit 1,(ix+#35)
	jp z,l9524
	ld (l9405),a
.l9524
	call l9650
	inc c
	ld a,(l93f7)
	adc (ix+#2e)
	call l9650
	inc c
	ld a,(l9405)
	rrca
	rrca
	rrca
	call l9650
	ld c,#08
	ld a,(l93d4)
	srl a
	srl a
	srl a
	call l9650
	inc c
	ld a,(l93e6)
	srl a
	srl a
	srl a
	call l9650
	inc c
	ld a,(l93f8)
	srl a
	srl a
	srl a
	call l9650
	jp l9684
.l9566
	ld a,(l93ce)
	and (ix+#02)
	cp (ix+#02)
	ret z
	ld a,(ix+#0f)
	ld ly,a
	ld a,(ix+#10)
	ld hy,a
	ld a,(ix+#06)
	and a
	jr z,l9587
	cp #ff
	jr z,l9587
	dec (ix+#06)
.l9587
	call l960e
	bit 2,(iy+#09)
	jp nz,l9607
	ld l,(ix+#0d)
	ld h,(ix+#0e)
	jp (hl)
.l9598
	ld a,(ix+#05)
	add (iy+#00)
	cp (iy+#04)
	jr nc,l95a7
	ld (ix+#05),a
	ret
.l95a7
	ld a,(iy+#04)
	ld (ix+#05),a
	ld hl,l95b7
	ld (ix+#0d),l
	ld (ix+#0e),h
	ret
.l95b7
	ld a,(ix+#05)
	add (iy+#01)
	jp m,l95c9
	cp (iy+#02)
	jr c,l95c9
	ld (ix+#05),a
	ret
.l95c9
	ld a,(iy+#02)
	ld (ix+#05),a
	ld hl,l95d9
	ld (ix+#0d),l
	ld (ix+#0e),h
	ret
.l95d9
	ld a,(ix+#06)
	and a
	ret nz
	ld hl,l95e8
	ld (ix+#0d),l
	ld (ix+#0e),h
	ret
.l95e8
	ld a,(ix+#05)
	add (iy+#03)
	jp m,l95f5
	ld (ix+#05),a
	ret
.l95f5
	ld (ix+#05),#00
	ld a,(l93ce)
	or (ix+#02)
	ld (l93ce),a
	res 7,(ix+#11)
	ret
.l9607
	ld a,(ix+#06)
	and a
	ret nz
	jr l95f5
.l960e
	ld a,(ix+#07)
	and a
	jr z,l961b
	cp #ff
	ret z
	dec (ix+#07)
	ret nz
.l961b
	ld l,(ix+#09)
	ld h,(ix+#0a)
	ld c,(ix+#0b)
	ld b,(ix+#0c)
	add hl,bc
	ld (ix+#09),l
	ld (ix+#0a),h
	dec (ix+#08)
	ret nz
	ld a,(iy+#06)
	and a
	ret z
	jp p,l963f
	ld (ix+#07),#ff
	ret
.l963f
	ld (ix+#08),a
	ld a,c
	cpl
	ld c,a
	ld a,b
	cpl
	ld b,a
	inc bc
	ld (ix+#0b),c
	ld (ix+#0c),b
	ret
.l9650
	ld b,#f4
	out (c),c
	ld b,h
	out (c),d
	out (c),e
	ld b,#f4
	out (c),a
	ld b,h
	out (c),l
	out (c),e
	ret
	ld bc,#f40e
	out (c),c
	ld de,#c000
	ld b,#f6
	out (c),d
	out (c),e
	ld d,#40
	out (c),d
	out (c),e
	ret
.l9678
	ld bc,#f782
	out (c),c
	ld de,#c000
	ld hl,#f680
	ret
.l9684
	ld bc,#f40e
	out (c),c
	ld b,h
	out (c),d
	out (c),e
	ret
	jp l972b	; init
	jp l97b3	; play
.l9695
.music_end
	db &00
	jp l96a0	; init sound effects
;
.stop_music
;
	xor a
	ld (l9695),a
	jp l948a
.l96a0
	push hl
	push de
	push bc
	push iy
	push ix
	ld l,a
	ld e,a
	ld h,#00
	ld d,h
	add hl,hl
	add hl,de
	add hl,hl
	add hl,hl
	add hl,de
	ld iy,la051
	ex de,hl
	add iy,de
	ld c,(iy+#0a)
	ld l,(iy+#0b)
	ld h,(iy+#0c)
	ld ix,l93cf
	call l9406
	set 7,(ix+#11)
	pop ix
	pop iy
	pop bc
	pop de
	pop hl
	ret
.l96db equ $ + 7
.l96d5 equ $ + 1
.l96d4
	db #00,#00,#00,#00,#00,#00,#00,#00
.l96e3 equ $ + 7
.l96e1 equ $ + 5
.l96e0 equ $ + 4
.l96df equ $ + 3
.l96de equ $ + 2
.l96dd equ $ + 1
	db #00,#00,#00,#00,#00,#00,#00,#00
.l96ea equ $ + 6
.l96e9 equ $ + 5
	db #00,#00,#00,#00,#00,#08,#00,#00
.l96f3 equ $ + 7
.l96f2 equ $ + 6
.l96f0 equ $ + 4
	db #00,#00,#00,#00,#00,#00,#00,#00
.l96f8 equ $ + 4
.l96f6 equ $ + 2
.l96f5 equ $ + 1
.l96f4
	db #00,#00,#00,#00,#00,#00,#00,#00
.l96ff equ $ + 3
.l96fe equ $ + 2
	db #00,#00,#10,#00
.l9707 equ $ + 7
.l9705 equ $ + 5
	db #00,#00,#00,#00,#00,#00,#00,#00
.l970d equ $ + 5
.l970b equ $ + 3
.l970a equ $ + 2
.l9709 equ $ + 1
.l9708
	db #00,#00,#00,#00,#00,#00,#00,#00
.l9713 equ $ + 3
	db #00,#00,#00,#00,#00,#00,#00,#00
	db #00,#00,#00,#00,#00,#00,#00,#00
	db #00,#00,#00,#00,#00,#00,#00,#00
	db #00,#00,#00
;
.init_music
.l972b
;
	push af
	call l948a
	pop af
	ld l,a
	add a
	add l
	add a
	ld hl,l9dfc
	add l
	ld l,a
	jr nc,l973c
	inc h
.l973c
	ld e,(hl)
	inc hl
	ld d,(hl)
	inc hl
	ld (l96d5),de
	ld e,(hl)
	inc hl
	ld d,(hl)
	inc hl
	ld (l96ea),de
	ld e,(hl)
	inc hl
	ld d,(hl)
	inc hl
	ld (l96ff),de
	xor a
	ld (l96de),a
	ld (l96f3),a
	ld (l9708),a
	ld (l96e3),a
	ld (l96f8),a
	ld (l970d),a
	cpl
	ld (l96df),a
	ld (l96f4),a
	ld (l9709),a
	ld a,#01
	ld (l96dd),a
	ld (l96f2),a
	ld (l9707),a
	ld (l96e0),a
	ld (l96f5),a
	ld (l970a),a
	ld hl,l9713
	ld bc,#030a
.l978b
	xor a
.l978c
	ld (hl),a
	inc hl
	add c
	ld (hl),a
	inc hl
	add c
	cp #50
	jr nz,l978c
	djnz l978b
	ld hl,l9fb9
	ld (l96db),hl
	ld (l96f0),hl
	ld (l9705),hl
	ld a,#ff
	ld (l96e1),a
	ld (l96f6),a
	ld (l970b),a
	ld (l9695),a
	ret
;
.play_music
.l97b3
;
	call l94aa	; added by Megachur
	ld a,(l9695)
	and a
	ret z
	ld a,(l96e1)
	ld hl,l96f6
	or (hl)
	ld hl,l970b
	or (hl)
	ld (l9695),a
	jr nz,l97da
	xor a
	ld (l9695),a
	ld a,(l93ce)
	and #3f
	cp #3f
	ret z
	ld a,#01
	ld (l9695),a
	ret
.l97da
	ld iy,l96d4
	ld ix,l93cf
	call l97f8
	ld iy,l96e9
	ld ix,l93e1
	call l97f8
	ld iy,l96fe
	ld ix,l93f3
.l97f8
	call l993c
	ld a,(iy+#0b)
	and a
	jr z,l987d
.l9801
	dec (iy+#09)
	jr z,l9818
	ld a,(iy+#03)
	ld (iy+#05),a
	ld a,(iy+#04)
	ld (iy+#06),a
	ld (iy+#0b),#00
	jr l987d
.l9818
	ld (iy+#09),#01
	ld l,(iy+#01)
	ld h,(iy+#02)
.l9822
	ld a,(hl)
	cp #80
	jr c,l985d
	cp #fe
	jr nz,l9834
	inc hl
	ld a,(hl)
	ld (iy+#0a),a
	inc hl
	jp l9822
.l9834
	cp #ff
	jr nz,l983d
	xor a
	ld (iy+#0d),a
	ret
.l983d
	cp #c0
	jr nc,l984a
	and #1f
	ld (iy+#09),a
	inc hl
	jp l9822
.l984a
	and #07
	add (iy+#00)
	ld de,l9713
	add e
	ld e,a
	jr nc,l9857
	inc d
.l9857
	inc hl
	ldi
	jp l9822
.l985d
	ld (iy+#0b),#00
	inc hl
	ld (iy+#01),l
	ld (iy+#02),h
	ld c,a
	ld b,#00
	ld hl,l9dc0
	add hl,bc
	ld e,(hl)
	ld hl,l9dde
	add hl,bc
	ld d,(hl)
	ld (iy+#03),e
	ld (iy+#04),d
	jr l9883
.l987d
	ld e,(iy+#05)
	ld d,(iy+#06)
.l9883
	dec (iy+#0c)
	jr z,l9895
	ld a,(de)
	cp #80
	call nc,l98ff
	ld (iy+#05),e
	ld (iy+#06),d
	ret
.l9895
	ld a,(de)
	cp #80
	jr c,l98a6
	call l98ff
	ld a,(iy+#0b)
	and a
	jr z,l9895
	jp l9801
.l98a6
	cp #7f
	jr z,l98f2
	cp #7e
	jr nz,l98b7
	inc de
	ld a,(de)
	ld l,a
	inc de
	ld a,(de)
	ld h,a
	jp l98d3
.l98b7
	add (iy+#0a)
	add #0c
	ld (iy+#0e),a
	ld hl,l99c7
	add a
	ld c,a
	ld b,#00
	add hl,bc
	ld a,(hl)
	inc hl
	ld h,(hl)
	ld l,a
	ld a,(iy+#0f)
	or #c0
	ld (iy+#14),a
.l98d3
	inc de
	ld a,(de)
	inc de
	ld (iy+#0c),a
	ld c,a
	ld (iy+#05),e
	ld (iy+#06),d
	ld e,(iy+#07)
	ld a,(iy+#08)
	ld hy,a
	ld ly,e
	bit 7,(ix+#11)
	ret nz
	jp l9406
.l98f2
	inc de
	ld a,(de)
	inc de
	ld (iy+#0c),a
	ld (iy+#05),e
	ld (iy+#06),d
	ret
.l98ff
	ld a,(de)
	cp #88
	jr nc,l991d
	and #07
	add (iy+#00)
	ld c,a
	ld b,#00
	ld hl,l9713
	add hl,bc
	ld c,(hl)
	ld hl,l9fb9
	add hl,bc
	ld (iy+#07),l
	ld (iy+#08),h
	inc de
	ret
.l991d
	cp #ff
	jr nz,l9926
	ld (iy+#0b),#ff
	ret
.l9926
	cp #c0
.l9929 equ $ + 1
	jr nc,l9934
	and #07
	add a
	add a
	add a
	ld (iy+#0f),a
	inc de
	ret
.l9934
	inc de
	cp #c2
	ret z
	inc de
	inc de
	inc de
	ret
.l993c
	ld a,(iy+#14)
	bit 7,a
	ret z
	and #3f
	jr nz,l994b
	res 7,(iy+#14)
	ret
.l994b
	ld d,#07
	bit 6,(iy+#14)
	jr nz,l997f
	dec (iy+#12)
	ret nz
	dec (iy+#13)
	jp z,l997f
	ld l,(iy+#10)
	ld h,(iy+#11)
	inc l
	ld (iy+#10),l
	jp nz,l996e
	inc h
	ld (iy+#11),h
.l996e
	ld a,(hl)
	and d
	ld (iy+#12),a
	ld a,(hl)
	rrca
	rrca
	rrca
	and #1f
	add (iy+#0e)
	jp l99b4
.l997f
	ld hl,l9929
	ld e,(iy+#14)
	res 7,e
	res 6,e
	add hl,de
	bit 7,(hl)
	jr nz,l9999
	bit 6,(iy+#14)
	jr nz,l9999
	ld (iy+#13),#01
	ret
.l9999
	res 6,(iy+#14)
	ld a,(hl)
	rrca
	rrca
	rrca
	and d
	ld (iy+#12),a
	ld a,(hl)
	and d
	inc a
	ld (iy+#13),a
	ld (iy+#10),l
	ld (iy+#11),h
	ld a,(iy+#0e)
.l99b4
	add a
	ld hl,l99c7
	add l
	ld l,a
	jr nc,l99bd
	inc h
.l99bd
	ld a,(hl)
	ld (ix+#03),a
	inc hl
	ld a,(hl)
	ld (ix+#04),a
	ret
.l99c7
	dw #0eee,#0e18,#0d4d,#0c8e
	dw #0bda,#0b2f,#0a8f,#09f7
	dw #0968,#08e1,#0861,#07e9
	dw #0777,#070c,#06a7,#0647
	dw #05ed,#0598,#0547,#04fc
	dw #04d4,#0470,#0431,#03f4
	dw #03dc,#0386,#0353,#0324
	dw #02f6,#02cc,#02a4,#027e
	dw #025a,#0238,#0218,#01fa
	dw #01de,#01c3,#01aa,#0192
	dw #017b,#0166,#0152,#013f
	dw #012d,#011c,#010c,#00fd
	dw #00ef,#00e1,#00d5,#00c9
	dw #00be,#00b3,#00a9,#009f
	dw #0096,#008e,#0086,#007f
	dw #0077,#0071,#006a,#0064
	dw #005f,#0059,#0054,#0050
	dw #004b,#0047,#0043,#003f
	dw #003c,#0038,#0035,#0032
	dw #002f,#002d,#002a,#0028
	dw #0026,#0024,#0022,#0020
	dw #0018
.l9a71
	db #80,#06,#0e,#12,#0e,#83,#12,#0e
	db #80,#12,#07,#12,#07,#10,#0e,#12
	db #0e,#83,#12,#0e,#80,#0b,#07,#0d
.l9a8b equ $ + 2
	db #07,#ff,#81,#91,#2a,#e0,#92,#28
.l9a96 equ $ + 5
	db #e0,#93,#27,#e0,#ff,#80,#12,#07
	db #12,#07,#12,#07,#10,#0e,#10,#0e
.l9aa4 equ $ + 3
	db #15,#07,#ff,#80,#12,#07,#12,#07
	db #12,#07,#0f,#0e,#0f,#0e,#14,#07
.l9ab2 equ $ + 1
	db #ff,#80,#12,#07,#12,#07,#12,#07
.l9ac0 equ $ + 7
	db #17,#0e,#17,#0e,#19,#07,#ff,#84
	db #91,#2a,#0e,#2a,#07,#92,#28,#0e
.l9acf equ $ + 6
	db #28,#0e,#94,#28,#07,#ff,#82,#94
	db #25,#e0,#23,#e0,#92,#23,#e0,#ff
.l9ad9
	db #84,#92,#2a,#0e,#2a,#07,#27,#0e
.l9ae7 equ $ + 6
	db #27,#0e,#94,#27,#07,#ff,#84,#92
	db #2a,#0e,#2a,#07,#94,#2a,#0e,#2a
.l9af6 equ $ + 5
	db #0e,#94,#2c,#07,#ff,#85,#31,#46
	db #2f,#0e,#31,#0e,#32,#1c,#31,#1c
	db #2f,#1c,#2d,#2a,#2f,#46,#2d,#0e
	db #2c,#0e,#2a,#7e,#31,#46,#2f,#0e
	db #31,#0e,#32,#1c,#31,#1c,#2f,#1c
	db #2d,#2a,#31,#07,#2f,#07,#2d,#07
	db #2f,#0e,#31,#07,#32,#07,#31,#4d
	db #2f,#0e,#31,#0e,#32,#1c,#31,#1c
	db #2f,#1c,#2d,#2a,#2f,#0e,#2d,#1c
	db #2b,#1c,#2d,#0e,#2f,#0e,#2d,#7e
	db #31,#46,#2f,#0e,#31,#0e,#32,#1c
	db #31,#1c,#2f,#1c,#2d,#2a,#31,#07
	db #2f,#07,#2d,#07,#2e,#0e,#2f,#07
	db #31,#07,#2f,#70,#3b,#4d,#38,#0e
	db #36,#0e,#3b,#54,#38,#0e,#36,#0e
	db #2f,#54,#36,#0e,#38,#0e,#3b,#46
	db #3a,#0e,#3b,#0e,#38,#0e,#3b,#7e
	db #33,#07,#34,#07,#36,#07,#38,#0e
.l9b88 equ $ + 7
	db #36,#07,#34,#07,#31,#07,#ff,#86
	db #12,#07,#12,#07,#12,#07,#12,#07
	db #0f,#07,#0f,#07,#0f,#07,#0f,#07
.l9b9a equ $ + 1
	db #ff,#86,#06,#0e,#06,#0e,#7f,#54
.l9ba2 equ $ + 1
	db #ff,#80,#06,#07,#12,#07,#10,#07
	db #12,#07,#83,#12,#07,#80,#0d,#07
	db #10,#07,#12,#07,#06,#07,#12,#07
	db #10,#07,#12,#07,#83,#12,#07,#80
.l9bc8 equ $ + 7
	db #0b,#07,#0c,#07,#0d,#07,#ff,#80
	db #06,#07,#12,#07,#10,#07,#12,#07
	db #83,#12,#07,#80,#0d,#07,#10,#07
.l9bdc equ $ + 3
	db #12,#07,#ff,#82,#92,#2a,#e0,#2a
.l9be3 equ $ + 2
	db #e0,#ff,#84,#92,#2a,#07,#2a,#0e
	db #2a,#07,#87,#90,#31,#07,#34,#07
.l9bf6 equ $ + 5
	db #36,#07,#2f,#07,#ff,#84,#94,#2a
	db #07,#2a,#0e,#2a,#07,#87,#90,#2f
	db #07,#34,#07,#36,#07,#2f,#07,#ff
.l9c09
	db #84,#93,#2c,#07,#2c,#0e,#2c,#07
	db #90,#87,#2f,#07,#34,#07,#36,#07
	db #2f,#07,#84,#94,#2c,#07,#2c,#0e
	db #2c,#07,#87,#90,#31,#07,#35,#07
.l9c2e equ $ + 5
	db #36,#07,#31,#07,#ff,#80,#31,#1c
	db #2f,#07,#2e,#0e,#2a,#4d,#34,#07
	db #33,#07,#2f,#07,#31,#07,#33,#07
	db #31,#3f,#33,#07,#31,#0e,#2f,#15
	db #2e,#07,#2a,#4d,#2c,#07,#2a,#07
	db #2c,#0e,#2a,#07,#2c,#15,#2a,#07
.l9c60 equ $ + 7
	db #2c,#0e,#2e,#07,#2f,#0e,#ff,#85
.l9c64 equ $ + 3
	db #31,#e0,#ff,#80,#31,#1c,#2f,#07
	db #31,#0e,#33,#15,#31,#0e,#2f,#0e
	db #31,#7e,#31,#1c,#2f,#07,#2d,#0e
	db #2f,#15,#2c,#0e,#2a,#0e,#2c,#7e
.l9c82 equ $ + 1
	db #ff,#80,#09,#0e,#09,#0e,#83,#12
	db #1c,#80,#0b,#0e,#0b,#0e,#83,#12
	db #1c,#80,#01,#07,#0d,#07,#0b,#07
	db #0d,#07,#83,#12,#0e,#80,#0b,#07
	db #0d,#07,#01,#0e,#01,#0e,#83,#12
.l9cab equ $ + 2
	db #1c,#ff,#80,#31,#07,#2f,#07,#2e
	db #07,#2f,#0e,#2d,#07,#2c,#07,#2d
.l9cbb equ $ + 2
	db #07,#ff,#80,#2e,#07,#2c,#07,#2a
	db #07,#25,#07,#31,#54,#2f,#07,#2d
	db #0e,#2a,#15,#2d,#07,#2a,#3f,#ff
.l9cd1
	db #81,#36,#0e,#36,#0e,#36,#07,#34
	db #07,#31,#07,#30,#15,#2f,#07,#2d
	db #07,#2f,#07,#2d,#07,#2a,#07,#28
	db #07,#2a,#07,#2a,#07,#2d,#07,#2f
	db #07,#30,#07,#2f,#07,#2d,#07,#2a
	db #0e,#2a,#07,#2d,#07,#2f,#07,#30
	db #07,#2f,#07,#2d,#07,#2a,#07,#2a
	db #07,#2a,#07,#28,#07,#2a,#0e,#2d
	db #07,#2f,#07,#2d,#07,#2a,#07,#2a
	db #07,#28,#07,#2a,#0e,#2d,#07,#2f
	db #07,#2d,#07,#2a,#07,#2a,#07,#28
	db #07,#2a,#0e,#2d,#07,#2f,#07,#2d
	db #07,#28,#04,#29,#03,#2a,#07,#2d
	db #07,#2f,#07,#30,#07,#31,#07,#34
.l9d45 equ $ + 4
	db #07,#35,#07,#ff,#81,#36,#04,#34
.l9d4f equ $ + 6
	db #03,#31,#04,#2f,#03,#ff,#7f,#e0
.l9d52 equ $ + 1
	db #ff,#81,#31,#04,#30,#03,#2f,#04
	db #2d,#03,#2a,#04,#34,#03,#25,#04
	db #23,#03,#25,#04,#28,#03,#2a,#04
	db #2d,#03,#2f,#04,#30,#03,#2f,#04
.l9d74 equ $ + 3
	db #2d,#03,#ff,#81,#31,#0e,#2f,#04
	db #30,#03,#31,#07,#31,#07,#2f,#07
	db #2d,#07,#2a,#3f,#31,#0e,#2f,#04
	db #30,#03,#31,#07,#31,#07,#2f,#07
	db #2d,#07,#2a,#15,#2d,#07,#2f,#07
	db #2d,#07,#2a,#07,#28,#07,#2a,#3f
	db #28,#38,#2a,#38,#2d,#07,#2c,#07
	db #2a,#07,#28,#0e,#2a,#07,#2c,#07
.l9db8 equ $ + 7
	db #2a,#e7,#2a,#e0,#2a,#07,#ff,#82
	db #92,#2a,#e0,#84,#2a,#07,#ff
.l9dc0
	db  l9a71,l9a8b,l9a96,l9aa4
	db  l9ab2,l9ac0,l9acf,l9ad9
	db  l9ae7,l9af6,l9b88,l9b9a
	db  l9ba2,l9bc8,l9bdc,l9be3
	db  l9bf6,l9c09,l9c2e,l9c60
	db  l9c64,l9c82,l9cab,l9cbb
	db  l9cd1,l9d45,l9d4f,l9d52
	db  l9d74,l9db8

;	db #71,#8b,#96,#a4,#b2,#c0,#cf,#d9
;	db #e7,#f6,#88,#9a,#a2,#c8,#dc,#e3
;	db #f6,#09,#2e,#60,#64,#82,#ab,#bb
;	db #d1,#45,#4f,#52,#74,#b8
.l9dde
	db  l9a71/&100,l9a8b/&100,l9a96/&100,l9aa4/&100
	db  l9ab2/&100,l9ac0/&100,l9acf/&100,l9ad9/&100
	db  l9ae7/&100,l9af6/&100,l9b88/&100,l9b9a/&100
	db  l9ba2/&100,l9bc8/&100,l9bdc/&100,l9be3/&100
	db  l9bf6/&100,l9c09/&100,l9c2e/&100,l9c60/&100
	db  l9c64/&100,l9c82/&100,l9cab/&100,l9cbb/&100
	db  l9cd1/&100,l9d45/&100,l9d4f/&100,l9d52/&100
	db  l9d74/&100,l9db8/&100

;	db #9a,#9a,#9a,#9a,#9a,#9a,#9a,#9a
;	db #9a,#9a,#9b,#9b,#9b,#9b,#9b,#9b
;	db #9b,#9c,#9c,#9c,#9c,#9c,#9c,#9c
;	db #9c,#9d,#9d,#9d,#9d,#9d
.l9dfc
	dw l9e02,l9ed9,l9f90
.l9e02
	db #83,#1a,#c3,#5a,#fe,#f6,#86,#00
	db #02,#fe,#f9,#86,#00,#03,#fe,#fb
	db #86,#00,#04,#c3,#1e,#fe,#f6,#86
	db #00,#02,#fe,#f9,#86,#00,#03,#fe
	db #fb,#86,#00,#04,#fe,#f6,#86,#0c
	db #02,#fe,#f9,#86,#0c,#03,#fe,#fb
	db #86,#0c,#04,#fe,#f6,#88,#0c,#fe
	db #fb,#0c,#0c,#fe,#f4,#0c,#fe,#f9
	db #0d,#fe,#f6,#0d,#fe,#fb,#0c,#0c
	db #fe,#f4,#0c,#fe,#f9,#0d,#fe,#f6
	db #0d,#fe,#fb,#15,#15,#fe,#f8,#0c
	db #0c,#fe,#fd,#0c,#fe,#f6,#0d,#fe
	db #f3,#0d,#fe,#f8,#0c,#0c,#fe,#fd
	db #0c,#fe,#f6,#0d,#fe,#f3,#0d,#fe
	db #f8,#02,#fe,#fb,#0d,#fe,#fe,#0d
	db #fe,#f7,#0d,#fe,#f4,#0d,#fe,#fb
	db #0d,#fe,#fe,#0d,#fe,#f7,#0d,#fe
	db #f4,#0d,#fe,#fb,#0d,#fe,#fe,#0d
	db #fe,#f7,#0d,#fe,#f4,#0d,#fe,#fb
	db #0d,#fe,#fe,#0d,#fe,#f7,#0d,#fe
	db #f4,#0d,#fe,#fb,#0d,#fe,#fe,#0d
	db #fe,#f7,#0d,#fe,#f4,#0d,#fe,#fb
	db #0d,#fe,#fe,#0d,#fe,#f7,#0d,#fe
	db #f4,#0d,#fe,#fb,#0d,#fe,#fe,#0d
	db #fe,#f7,#0d,#fe,#f4,#0d,#fe,#fb
	db #0d,#fe,#fe,#0d,#fe,#f7,#0d,#fe
	db #f4,#0d,#fe,#fb,#85,#0c,#ff
.l9ed9
	db #fe,#02,#01,#01,#05,#fe,#05,#06
	db #07,#fe,#fb,#06,#08,#fe,#02,#c1
	db #14,#01,#05,#fe,#05,#06,#07,#fe
	db #fb,#06,#08,#fe,#02,#01,#05,#fe
	db #05,#06,#07,#fe,#fb,#06,#08,#fe
	db #02,#0e,#88,#0f,#fe,#07,#84,#0f
	db #10,#10,#11,#84,#0f,#10,#10,#11
	db #c7,#5a,#c3,#1e,#fe,#05,#10,#fe
	db #07,#10,#fe,#09,#10,#10,#fe,#05
	db #10,#fe,#07,#10,#fe,#09,#10,#10
	db #c7,#46,#c3,#1e,#fe,#04,#84,#0f
	db #10,#10,#11,#84,#0f,#10,#10,#11
	db #05,#fe,#07,#0f,#fe,#05,#10,#fe
	db #03,#0f,#fe,#07,#10,#0f,#fe,#05
	db #10,#fe,#03,#0f,#fe,#07,#10,#0f
	db #fe,#05,#10,#fe,#03,#0f,#fe,#07
	db #10,#0f,#fe,#05,#10,#fe,#03,#0f
	db #fe,#07,#10,#0f,#fe,#05,#10,#fe
	db #03,#0f,#fe,#07,#10,#0f,#fe,#05
	db #10,#fe,#03,#0f,#fe,#07,#10,#0f
	db #fe,#05,#10,#fe,#03,#0f,#fe,#07
	db #10,#0f,#fe,#05,#10,#fe,#03,#0f
	db #fe,#07,#10,#84,#0f,#1d,#ff
.l9f90
	db #fe,#02,#86,#1a,#0a,#86,#0b,#0a
	db #86,#0b,#0a,#09,#09,#13,#83,#1a
	db #fe,#07,#c0,#50,#12,#12,#14,#fe
	db #04,#12,#12,#16,#fe,#07,#17,#17
	db #c1,#64,#18,#98,#19,#1b,#1b,#1c
.l9fb9 equ $ + 1
	db #ff,#7f,#fc,#01,#fd,#6e,#00,#09
	db #00,#00,#01,#01,#ff
	db #01,#fd,#50,#0a,#05,#01,#00,#01
	db #01,#ff,#01,#fd,#64,#0a,#05,#01
	db #00,#01,#7f,#fb,#01,#fd,#5a,#03
	db #02,#02,#02,#03,#7f,#f9,#01,#fd
	db #64,#00,#05,#01,#00,#01,#2e,#fb
	db #4a,#fd,#7f,#03,#03,#01,#00,#01
	db #7f,#fc,#01,#fd,#5a,#02,#00,#17
	db #00,#03,#0c,#f9,#01,#fd,#03,#00
	db #00,#00,#00,#05,#26,#fe,#01,#fd
	db #7f,#08,#03,#01,#00,#01,#00,#00
	db #00,#00,#64,#00,#00,#00,#00,#00
	db #7f,#fe,#01,#fd,#7f,#07,#01,#02
	db #00,#01,#7f,#ff,#01,#fd,#7f,#07
	db #04,#01,#00,#01,#8a,#19,#39,#00
	db #00,#00,#00,#00,#8a,#21,#39,#00
	db #00,#00,#00,#00,#8a,#19,#41,#00
	db #00,#00,#00,#00,#8a,#29,#49,#00
.la051 equ $ + 4
	db #00,#00,#00,#00,#21,#d9,#7f,#fa
	db #7f,#00,#00,#13,#00,#01,#02,#aa
	db #00,#7f,#fa,#01,#81,#7f,#00,#00
	db #05,#00,#01,#02,#9d,#00,#7f,#fa
	db #01,#ff,#7f,#00,#00,#01,#00,#02
	db #08,#6a,#03,#35,#fc,#66,#fb,#64
	db #18,#21,#2d,#00,#02,#02,#dd,#00
	db #08,#fc,#66,#f1,#05,#02,#7f,#01
	db #00,#05,#1a,#0f,#00,#7f,#f0,#01
	db #01,#7f,#00,#00,#01,#00,#02,#05
	db #6a,#03,#32,#c1,#7f,#fd,#20,#02
	db #7f,#f5,#ff,#01,#02,#e6,#05,#7f
	db #ff,#7f,#ff,#7f,#00,#01,#01,#00
	db #01,#02,#81,#00,#21,#d9,#7f,#fa
	db #7f,#00,#00,#13,#aa,#01,#00,#00
	db #02,#21,#d9,#7f,#fa,#7f,#00,#00
	db #13,#aa,#01,#00,#00,#02,#21,#d9
	db #7f,#fa,#7f,#00,#00,#13,#aa,#01
	db #00,#00,#02,#21,#d9,#7f,#fa,#7f
	db #00,#00,#13,#aa,#01,#00,#00,#02
	db #21,#d9,#7f,#fa,#7f,#00,#00,#13
	db #aa,#01,#00,#00,#02
	
;org #66c2
;.l66c2
;ld a,(#9695)
;or a
;jr nz,l66cc
;xor a
;call #972b	; init music
;.l66cc
;call #97b3	; play
;call #94aa	; play
;call #9663
;ld bc,#09c4
;.l66d8
;dec bc
;ld a,b
;or c
;jr nz,l66d8
;call #90f7
;jp nz,l66c2
;call &948a	;stop

.game_name
	db "Masters of the Universe",0
.game_year
	db "1987",0
.game_publisher
	db "Gremlin Graphics",0
.music_author
	db "Ben Daglish",0
.music_comment
	db "",0
	
	read "music_end_v1_0.asm"
